package com.bw.gmall.realtime.Day0919;

public class ClickHouseTest {
    public static void main(String[] args) {
        ClickHouseUtil CkUtil = new ClickHouseUtil("hadoop102",8123,"gmall","","");

        boolean connect = CkUtil.connect();

        if (connect) {
            System.out.println("<===============ClickHouse数据库连接成功===============>");
        }

        System.out.println("查询结果为:");


        CkUtil.queryAndPrint("SELECT * FROM gmall.dws_traffic_source_keyword_page_view_window2");


        System.out.println("<===============ClickHouse数据库连接已关闭===============>");
        CkUtil.close();
    }
}
